package moodish.client.gui.utils;



import java.io.File;

import moodish.client.gui.Loader;

public class MoodishLoader {
	
	
	public static Loader load(String mood){
		
		if(exists(mood)){
			return new Loader("./resources/emotions/" + mood + ".jpg", false,false, null, null);
		}
		return null;
	}
	
	
	
	public static boolean exists(String imageName){
		File reader = new File("./resources/emotions");
		String[] list = reader.list();
		for (String fileName : list) {
			System.out.println(fileName);
			if(fileName.equals(imageName)){
				return true;
			}
		}
		return false;
	}

}
